<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>插值表达式</title>
		<link rel="stylesheet" type="text/css" href="css.css"/>
	</head>
	<body>
		<div class="form" ms-controller="interpolate">
			<button ms-click="onBtnClick">点击改变固定数值</button>
			<div for="">固定数值          {{age}}</div>
			<div for="">年份              {{new Date().getFullYear()}}</div>
			<div for="">固定数值+1:  {{age+1}}</div>
			<div for="">函数+2      {{func(age)}}</div>
		</div>
		<script src="../avalon.1.39.js" type="text/javascript" charset="utf-8"></script>
		<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
		<script type="text/javascript">
			var vmodel=avalon.define({
				$id:"interpolate",
				age:10,
				func:function(){
					return age+2;
				},
				onBtnClick:function(){
					vmodel.age= parseInt(Math.random()*10);
				}
			})
		</script>
	</body>
</html>
